<?php
	

	
	function view_wrong_email()
	{
		return 'Veuillez choisir un autre identifiant celui-ci est d&eacute;j&agrave; pris.';

	}
	
	function view_error_db()
	{
		return 'Erreur dans l\'insertion de la BDD.';
	}
	
	function view_account_created($email)
	{
		return 'Bravo votre compte "' . $email . '" a bien &eacute;t&eacute; cr&eacute;&eacute;, vous pouvez &agrave; pr&eacute;sent vous connecter';
	}
	
	function view_creation_form()
	{
		return '
			<script src="'. URL_JS .'sha1.js" type="text/javascript"></script>
			<script type="text/javascript">

				function crypt()
				{
					var password1= document.getElementById(\'password1\').value;
					var password2= document.getElementById(\'password2\').value;
					if( password1!= password2)
					{
						alert("Veuillez rentrer deux fois le m\352me mot de passe.");
                                                window.location.replace("'. URL_ROOT .'create-admin");
                                                
					}
					
					document.getElementById(\'password1\').value= sha1(password1);
					document.getElementById(\'password2\').value= sha1(password2);

					document.Connexion.submit();
				}
			</script>
			<div id="quickregistration">
				<h1 id="admin_title">' . LANG_REGISTRATION_TITLE . '</h1>
				
				<span id="box_create_admin">
				<div id="annonce" >
			        ' . LANG_REGISTRATION_MESSAGE.'
				</div>
				
				<form id="registration" action="' . URL_ROOT . 'create-admin" method="POST">
					<input type="hidden" name="module_name" value="quick_registration"> 
					<span id="messagebox"><label id="message" for="email">'.LANG_REGISTRATION_EMAIL.'</label></span>
					<span id="messagebox"><input type="text" name="email" id="email" value="" ></span>
					<span id="messagebox"><label id="message" for="password1">'.LANG_REGISTRATION_PASSWORD.'</label></span>
					<span id="messagebox"><input type="password" name="password1" id="password1" value="" ></span>
					<span id="messagebox"><label id="message" for="password2">'.LANG_REGISTRATION_AGAIN.'</label></span>
					<span id="messagebox"><input type="password" name="password2" id="password2" value="" ></span>
					
					<input id="register_button" type="submit" onclick="crypt();" value="'.LANG_REGISTRATION_LOGIN.'">
				</form>
				</span>
			</div>';
	}
?>